home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / lib / partman / fstab.d / hostboot < prev    next >
Text File  |  2008-06-20  |  670b  |  31 lines

  1. #!/bin/sh
  2.  
  3. . /lib/partman/lib/base.sh
  4.  
  5. finish(){
  6.     close_dialog
  7.     exit 0
  8. }
  9.  
  10. for dev in $DEVICES/*; do
  11.     [ -d $dev ] || continue
  12.     cd $dev
  13.     open_dialog PARTITIONS
  14.     while { read_line num id size type fs path name; [ "$id" ]; }; do
  15.         [ $fs != free ] || continue
  16.         [ -f "$id/method" ] || continue
  17.         [ -f "$id/acting_filesystem" ] || continue
  18.         [ -f "$id/mountpoint" ] || continue
  19.         [ "$(cat $id/mountpoint)" = / ] || continue
  20.         [ -f "loop" ] || finish
  21.         loopfile=$(cat loop)        
  22.         loopdir=${loopfile%/*}
  23.         [ -n "$loopdir" ] || finish 
  24.         [ "$loopdir" != / ] || finish
  25.         [ -d "$loopdir/boot" ] || finish 
  26.         echo "$loopdir/boot" /boot none bind 0 0
  27.         finish
  28.     done
  29.     close_dialog
  30. done
  31.